
package cn.edu.nuc.creditSystem.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.edu.nuc.creditSystem.bean.BaseBean;
import cn.edu.nuc.creditSystem.bean.TreeBean;
import cn.edu.nuc.creditSystem.utils.PageBean;

public interface BaseMapper<T extends BaseBean> extends MapperMarker {

	int insert(T model);
	
	T get(@Param("id") Integer id);
	
	int update(T model);
	
	List<T> findAll(@Param("query") T model);
	
	public int countAll(@Param("query") T query);
	
	public List<T> query(@Param("query") T query, @Param("page")  PageBean page);
	
	public int updateStatus(@Param("ids") String ids, @Param("status") int status);

	int delete(int id);
	
	/**
	 * 获取嵌套的树形结构
	 * @param param 
	 * @return
	 */
	List<TreeBean> queryTree(@Param("param") String param);
}